package com.turing.data.scripts.contract.filter

import com.turing.common.util.StringUtils
import com.turing.data.engine.utils.ScriptsUtils
import com.turing.data.vo.out.review.DependParamsVO
import com.turing.data.vo.out.review.TaskElementVO

/**
 * 场景：资产管理合同
 * 版本：Version 1
 * 要素名称：运作期是否允许份额转让
 */

class IfShareTransfer_30188_10_filter {

    static List< TaskElementVO.DrawResultVO > doConvert(DependParamsVO dependParams){

        def Regex_HAS = /.*份额转让.*/
        def Regex_NOT_HAS = /.*不.*份额转让.*/

        def textPathMap = dependParams.textPathMap

        List<TaskElementVO.DrawResultVO > trueValueSet = new ArrayList<>()
        List<TaskElementVO.DrawResultVO > resultVOs = ScriptsUtils.tryInitResult(dependParams)
        if (resultVOs!=null && resultVOs.size()>0 && !StringUtils.isEmpty(resultVOs[0].text)) {
            trueValueSet.add(resultVOs[0])
            return trueValueSet
        }

        TaskElementVO.DrawResultVO defaultDrawResultVO = new TaskElementVO.DrawResultVO()
        defaultDrawResultVO.text = "否"
        trueValueSet.add(defaultDrawResultVO)
        return  trueValueSet
    }

}
